<template>
	<div class="authentication bg-f5">
		<div class="authentication-input  bg-white">
			<div class="input_com w92 auto pt20 pb20 border-b flex flex-start">
				<span class="bold fs14">公司名称</span>
				<input type="text" placeholder="请输入公司名称" v-model="form.company_name" class="ml10 fs12 c666">
			</div>
			<div class="input_com w92 auto pt20 pb20 border-b flex flex-start">
				<span class="bold fs14">统一社会信用代码</span>
				<input placeholder="请输入统一社会信用代码或注册号" type="text" v-model="form.credit_code" class="ml10 fs12 c666">
			</div>
			<div class="input_com w92 auto pt20 pb20 border-b flex flex-start">
				<span class="bold fs14">联系人<i class="red">*</i></span>
				<input type="text" placeholder="请输入联系人姓名" v-model="form.user_name" class="ml10 fs12 c666">
			</div>
			<div class="input_com w92 auto pt20 pb20 border-b flex flex-start">
				<span class="bold fs14">联系方式<i class="red">*</i></span>
				<input placeholder="请输入联系手机号码" type="number" v-model="form.mobile" class="ml10 fs12 c666">
			</div>
			<div class="input_com w92 auto pt20 pb20 flex flex-start">
				<span class="bold fs14">邀请码</span>
				<input placeholder="请输入市场经理邀请码" type="text" v-model="form.invitation_code" class="ml10 fs12 c666">
			</div>
        </div>
        <p class="fs12 red pt10 pb10 w92 auto">* 资料认证成功之后只可修改联系人和联系方式</p>
        <button class="btn-button pt10 pb10 auto w92 radius mt40" :class="{ on : boolean }" @click="submit">确定</button>
        <button class="bg-red white pt10 pb10 auto w92 radius mt20" @click="submit">跳过</button>
	</div>
</template>

<script>
import { Toast } from 'vant';
	export default{
		data()
		{
			return{
				verify : false, 
				form   : {
					company_name    : '',
					credit_code     : '',
					user_name       : '',
					mobile          : '',
					invitation_code : ''
				}
			}
		},
		computed:
		{
			boolean()
			{
				var boolean = false;
				this.verify = false;

				if(!this.form.user_name || !this.form.mobile )
				{
					this.verify = false;
					boolean = false;
				}
				else
				{
					this.verify = true;
					boolean = true;
				}

				return boolean;
			}
		},
		methods:
		{
			submit()
			{
				!this.verify && Toast('请填写带*项');

			}
		}
	}
</script>

<style lang="less">
	.authentication{
		.authentication-input{
			.input_com {
				span{
					width: 7rem;
				}
				input{
					width: 13rem;
				}
			}
		}
		.on{
			background-color:#ff0036;
			color: white;
		}
	}
</style>